from fastapi import FastAPI
from fastapi.staticfiles import StaticFiles
from routes.app import router

app = FastAPI()

# 包含路由
app.include_router(router)

# 挂载静态文件目录，提供/uploads/路径下的文件访问（避免与API路由冲突）
app.mount("/uploads", StaticFiles(directory="upload"), name="uploads")

if __name__ == "__main__":
    import uvicorn
    uvicorn.run("main:app", host="0.0.0.0", port=8000, reload=True)